<?php
use yii\helpers\Html;
use yii\widgets\LinkPager;

?>
<div class="container" style="margin-top: 30px;">
    <div class="row">
        <div class="col-sm-1"></div>
        <div class="col-sm-9">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>#</th>
                    <th>标题</th>
                    <th>添加时间</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($article as $value) {
                    $con++;
                    ?>
                    <tr>
                        <th><?php echo $con; ?></th>
                        <td><?php echo $value->title; ?></td>
                        <td><?php echo $value->addtime; ?></td>
                    </tr>
                <?php } ?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-10 col-sm-5 col-md-3" style="text-align: right;">
            <?php echo LinkPager::widget([
                'pagination' => $pagination,
                'maxButtonCount' => 5, //显示5页，默认最大为10
//        'firstPageLabel' => '首页',
//        'nextPageLabel' => '下一页',
//        'prevPageLabel' => '上一页',
//        'lastPageLabel' => '末页',
            ])
            ?>
        </div>
    </div>
</div>